﻿var WIDTH = 384, HEIGHT = 448;
var FPS = 60;

var canvas, context;

var pause;

var player, graze, score;

var enemy;

var player_bullet;
var enemy_bullet;

var effect;

// tools
var cos = Math.cos, sin = Math.sin, pi = Math.PI, rand = Math.random;
var abs = Math.abs, atan2 = Math.atan2, floor = Math.floor;

function patan2(x, y) {
    return atan2(player.y - y, player.x - x);
}

function rang(ang) {
    return ang * (-1 + rand() * 2);
}

function rint(x) {
    return floor(rand() * x);
}
